package cn.service.impl;

import cn.entity.Examine;
import cn.entity.ExamineCondition;
import cn.mapper.ExamineMapper;
import cn.service.ExamineService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional //开启事务
public class ExamineServiceImpl extends BaseServiceImpl<Examine> implements ExamineService {

    @Autowired
    ExamineMapper examineMapper;
    @Override
    public PageInfo<Examine> listPage(int pagNum, int pageSize, ExamineCondition condition) {
        PageHelper.startPage(pagNum,pageSize);
        List<Examine> list = examineMapper.selectPage(condition);
        return new PageInfo<Examine>(list,4);
    }
}
